/**
 * Created with IntelliJ IDEA.
 * User: 12629
 * Date: 2022/2/20
 * Time: 13:48
 * Description:
 */
//类名 采用大驼峰
class WashMachine {
    public String brand; // 品牌
    public String type; // 型号
    public double weight; // 重量
    public double length; // 长
    public double weidth; // 宽
    public double height; // 高
    public String color; // 颜色

    public void washClothes(){ // 洗衣服
        System.out.println("洗衣功能");
    }

    public void dryClothes(){ // 脱水
        System.out.println("脱水功能");
    }

    public void setTime(){ // 定时
        System.out.println("定时功能");
    }
}

class Dog {
    //属性-》字段
    public String name;
    public int age;
    public String color;

    public void eat() {
        System.out.println(name+"吃饭！");
    }

    public void bark() {
        System.out.println(name+"旺旺！");
    }
}
public class TestDemo2 {

    public static void main(String[] args) {
        Dog dog = new Dog();//通过new关键字来实例化一个Dog对象
        dog.name = "旺财";
        dog.eat();
        dog.bark();

        Dog dog2 = new Dog();
        dog2.name = "旺财2";
        dog2.eat();
        dog2.bark();

        Dog dog3 = new Dog();
        Dog dog4 = new Dog();
        Dog dog5 = new Dog();

    }
    public static void main1(String[] args) {
        Dog dog = new Dog();//通过new关键字来实例化一个Dog对象
        System.out.println(dog.name);
        System.out.println(dog.age);
        System.out.println(dog.color);
        dog.name = "旺财";
        System.out.println(dog.name);
    }
}
